<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css" type="text/css"/>
    <link rel="stylesheet" href="/css/index.css" type="text/css"/>
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
    <title>读者借书记录</title>
</head>
<body>
<div th:insert="~{navigation :: nav}"></div>
<div style="padding: 3%;">
    <table class="table table-striped" style="width: 100%">
        <tr>
            <th style="width: 40%">图书ID</th>
            <th style="width: 40%">借书时间</th>
            <th style="width: 20%">管理</th>
        </tr>
        <tr th:each="record:${records}">
            <th th:text="${record.getId()}"></th>
            <th th:text="${#dates.format(record.gmtCreated,'yyyy-MM-dd')}"></th>
            <th>
                <form action="/returnBook" method="post">
                    <input type="hidden" name="bid" th:value="${record.id}">
                    <input type="hidden" name="btime" th:value="${record.gmtCreated}">
                    <button class="btn btn-success" type="submit" role="button">归还</button>
                </form>
            </th>
        </tr>
    </table>
</div>
</body>
</html>